import fetch from '@/utils/fetch'
import { removeDateTime } from "@/filters";

export function created(data) {
    return fetch({
        url: '/api/tukuan/car/state/add',
        method: 'post',
        data
    })
}

export function deleted(id) {
    return fetch({
        url: '/api/tukuan/car/state/delete/'+id,
        method: 'get'
    })
}

export function updated(data) {
    data = removeDateTime(data)
    return fetch({
        url: '/api/tukuan/car/state/update',
        method: 'post',
        data
    })
}

export function fetchObject(id) {
    return fetch({
        url: '/api/tukuan/car/state/get/'+id
    })
}

export function fetchList(query) {
    return fetch({
        url: '/api/tukuan/car/state/list',
        method: 'get',
        params: query
    })
}
export function saveCompensate(data) {
    return fetch({
        url: '/api/tukuan/car/state/compensate',
        method: 'post',
        data
    })
}

export function changeFollow(data) {
    return fetch({
        url: '/api/tukuan/car/state/follow',
        method: 'post',
        data
    })
}

export function reportUserMonthMoney(query) {
    return fetch({
        url: '/api/tukuan/car/state/reportUserMonthMoney',
        method: 'get',
        params: query
    })
}

export function reportCarInjureMonthTotal(query) {
    return fetch({
        url: '/api/tukuan/car/state/reportCarInjureMonthTotal',
        method: 'get',
        params: query
    })
}

export function reportUserMonthCheck(query) {
    return fetch({
        url: '/api/tukuan/car/state/reportUserMonthCheck',
        method: 'get',
        params: query
    })
}

export function reportUserMonthTc(query) {
    return fetch({
        url: '/api/tukuan/car/state/reportUserMonthTc',
        method: 'get',
        params: query
    })
}

export const uploadUrl = '/api/tukuan/car/state/upload'



